package com.vainycos.lotterysearch.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.vainycos.lotterysearch.model.WorldCupDetailDO;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface WorldCupDetailMapper extends BaseMapper<WorldCupDetailDO> {

    @Update("truncate world_cup_detail")
    void truncate();

    @Select("select ranks from (select start_time, rank() over(order by hot desc) as ranks  from world_cup_detail  ) res where start_time=#{startTime}")
    int rank(String startTime);
}
